<{include file="admin:common/header.html"}>
<div class="page-title">
    <table width="100%" align="center" cellpadding="0" cellspacing="0" >
      <tr>
        <td width="30" align="right"><img src="<{$pager.url}>/images/main-h5-ico.gif" alt="" /></td>
        <th><{$MOD.title}></th>
        <td align="right"><{link ctl="truste/truste:index" priv="hidden" class="button"}></td>
        <td width="15"></td>
      </tr>
    </table>
</div>
<div class="page-data">
<form action="?truste/truste-edit.html" mini-form="truste-form" method="post" ENCTYPE="multipart/form-data">
<input type="hidden" name="truste_id" value="<{$detail.truste_id}>"/>
<table width="100%" border="0" cellspacing="0" class="table-data form">
<tr><th>标题：</th><td><input type="text" name="data[title]" value="<{$detail.title|default:''}>" class="input w-300"/></td></tr>
<tr><th>分类：</th><td><{$cates[$detail.cate_id].title}></td></tr>
<tr><th>城市：</th><td><{widget id="data/region" city_id=$detail.city_id area_id=$detail.area_id}></td></tr>
<tr>
    <th>会员：</th>
    <td>
        <{$member.uname}>
    </td>
</tr>
<tr><th>预算：</th><td><input type="text" name="data[budget]" value="<{$detail.budget|default:''}>" class="input w-300"/></td></tr>
<tr><th>托管：</th><td><{$detail.truste|default:''}><{if $detail.is_pay == 1}>已支付<{else}>未支付<{/if}></td></tr>
<tr><th>联系人：</th><td><input type="text" name="data[contact]" value="<{$detail.contact|default:''}>" class="input w-300"/></td></tr>
<tr><th><span class="red">*</span>手机号：</th><td><input type="text" name="data[mobile]" value="<{$detail.mobile|default:''}>" class="input w-300"/></td></tr>
<tr><th>图片：</th><td><input type="file" name="photo" class="input w-300" />
<tr><th>地址：</th><td><input type="text" name="data[addr]" value="<{$detail.addr|default:''}>" class="input w-500"/></td></tr>
<tr><th>业主要求：</th><td><textarea name="data[comment]" class="textarea"><{$detail.comment}></textarea><br /></td></tr>
<tr><th>招标售价：</th><td><input type="text" name="data[gold]" value="<{$detail.gold|default:''}>" class="input w-100"/></td></tr>
<tr><th>最大投标数：</th><td><input type="text" name="data[max_look]" value="<{$detail.max_look|default:''}>" class="input w-100"/></td></tr>
<tr><th>已投标数：</th><td><input type="text" name="data[looks]" value="<{$detail.looks|default:''}>" class="input w-100"/><span class="tip-comment">已经有几家查看了</span></td></tr>
<tr><th>浏览数：</th><td><input type="text" name="data[views]" value="<{$detail.views|default:''}>" class="input w-100"/></td></tr>

    <tr><th class="clear-th-bottom"></th><td class="clear-td-bottom" colspan="10"><input type="submit" class="bt-big" value="提交数据" /></td></tr>
</table>
</form></div>
<script type="text/javascript">
(function(K, $){
$("select[name='data[city_id]']").live('change', function(){
	var city_id = $(this).val();
	if(!city_id){return false;}
	$.getJSON("?data/area-city-"+city_id+".html", function(ret){
		if(ret.error){
			Widget.MsgBox.error(ret.message.join(","));
		}else if(ret.areas.length>0){
			var html = "";
			for(var i=0; i<ret.areas.length; i++){
				html += '<option value="'+ret.areas[i].area_id+'">'+ret.areas[i].area_name+'</option>';
			}
			$("select[name='data[area_id]']").html(html);		
		}else{
			$("select[name='data[area_id]']").html('<option value="">--</option>');
		}
	});
});
})(window.KT, window.jQuery);
</script>
<{include file="admin:common/footer.html"}>